﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:CodeAngel.UI">

    <Style TargetType="local:HorizontalLabeledControl">
        <Setter Property="Margin" Value="0,1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:HorizontalLabeledControl">
                    <Grid Margin="{TemplateBinding Margin}" Background="{TemplateBinding Background}" Height="{TemplateBinding Height}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <StackPanel Orientation="Horizontal" Width="{TemplateBinding LabelWidth}" VerticalAlignment="Top" Margin="0,0,0,0" >
                            <TextBlock Text="{TemplateBinding Label}" />
                            <TextBlock Text=":" Margin="1,0,0,0"/>
                        </StackPanel>

                        <ContentPresenter x:Name="ContentPresenter" Content="{TemplateBinding Content}" Grid.Column="1" Margin="4,0,0,0" />
                        
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>